package com.uwantsoft.util;

import com.uwantsoft.business.facade.dto.user.UserDto;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * @author Chuanbao
 */
public abstract class SecurityUtils {

    public static UserDto currentUser(){
        return (UserDto) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
